package slu.appli.wodtimer.info;

import slu.appli.tools.parser.stringparser.interfaces.model.ModelReaderInterface;


public class WodTimerInformation {
	public static final int STATE_END = 0;
	public static final int STATE_START = 1;
	public static final int STATE_NEW_ELAPSE = 2;
	public static final int STATE_ELAPSE = 3;
	public static final int STATE_PAUSE = 4;
	public static final int STATE_RESTART = 5;
	public static final int STATE_ERROR = 6;
	private long startTime = 0;
	private long elapseStartTime = 0;
	private long elapseDuration = 0;
	private long elapse = 0;
	private long duration = 0;
	private long realDuration = 0;
	private long pauseDuration = 0;
	private int state = STATE_END;
	private ModelReaderInterface reader = null;
	
	public WodTimerInformation(long startTime, long elapseStartTime,
			long elapseDuration, long elapse, long duration, long realDuration,
			long pauseDuration, int state, ModelReaderInterface reader) {
		super();
		this.startTime = startTime;
		this.elapseStartTime = elapseStartTime;
		this.elapseDuration = elapseDuration;
		this.elapse = elapse;
		this.duration = duration;
		this.realDuration = realDuration;
		this.pauseDuration = pauseDuration;
		this.state = state;
		this.reader = reader;
	}
	public long getDuration() {
		return this.duration;
	}
	public long getElapse() {
		return this.elapse;
	}
	public long getElapseDuration() {
		return this.elapseDuration;
	}
	public long getElapseTime() {
		return this.elapseStartTime;
	}
	public long getPauseDuration() {
		return this.pauseDuration;
	}
	public ModelReaderInterface getReader() {
		return reader;
	}
	public long getRealDuration() {
		return this.realDuration;
	}
	public long getStartTime() {
		return this.startTime;
	}
	public int getState() {
		return this.state;
	}
	public boolean isElapse() {return this.state == STATE_ELAPSE;}
	public boolean isNewElapse() {return this.state == STATE_NEW_ELAPSE;}
	public boolean isEnd() {return this.state == STATE_END;}
	public boolean isError() {return this.state == STATE_ERROR;}
	public boolean isPause() {return this.state == STATE_PAUSE;}
	public boolean isStart() {return this.state == STATE_START;}
	public boolean isRestart() {return this.state == STATE_RESTART;}
}
